package com.freewater.javabase.demo.designpattern.command2.withundos.command;

import com.freewater.javabase.demo.designpattern.command2.withundos.receiver.Garage;

/**
 * Created by FreeWater on 2017/4/4.
 */
public class GarageDoorUpCommand implements Command {

	private Garage garage;

	public GarageDoorUpCommand(Garage garage){
		this.garage = garage;
	}

	@Override
	public void execute() {
		this.garage.up();
	}

	@Override
	public void undo() {
		this.garage.down();
	}
}
